package com.ntschy.taizhou.designpattern.装饰器模式1;
// 【五分钟学设计模式.05.装饰器模式】 https://www.bilibili.com/video/BV1hp4y1D7MP/?share_source=copy_web&vd_source=cf231d00bdeff3cce626cd1b9b9e1d1f


public class RobotTest {

    public static void main(String[] args) {
        //基础功能
        FirstRobot firstRobot = new FirstRobot();
        firstRobot.dosomeThing();

        System.out.println("--扩展功能---");
        //扩展功能
      RobotDerector robotDerector = new RobotDerector(new FirstRobot());
        robotDerector.mopfloor();

        System.out.println("--扩展功能,,3 ---");
        RobotDerectorThree robotDerectorThree = new RobotDerectorThree(new RobotDerector(new FirstRobot()));
      robotDerectorThree.dance();
      // 同时也可以实现其他代机器人的功能
      //  robotDerectorThree.dosomeThing();

    }
}
